<?php

namespace app\api\controller;

use app\common\lib\Param;
use app\common\lib\Show;
use app\common\lib\Str;
use app\Request;
use think\facade\Cache;
use think\response\Json;

class SystemConfig extends ApiBase
{
    public function getData(): Json
    {
        $type = input("type", 0, "intval");

        try {
            $result = (new \app\common\business\SystemConfig())->getListByType($type);
        } catch (\Exception $e) {
            return Show::error([], $e->getMessage(), $e->getCode());
        }

        return Show::success($result);
    }
}
